// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
const apiPrefix = '/web';

/** 新增电价 新增电价 POST /station/fee/add */
export async function stationFeeControllerAddFee(
  body: API.StationFeeDto,
  options?: { [key: string]: any },
) {
  return request<boolean>(`${apiPrefix}/station/fee/add`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 批量操作 批量操作 POST /station/fee/batch */
export async function stationFeeControllerBatch(
  body: API.BatchOperatorReq,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultVoid>(`${apiPrefix}/station/fee/batch`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 导出数据 导出数据 GET /station/fee/download/excel */
export async function stationFeeControllerDownloadExcel(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.stationFeeControllerDownloadExcelParams,
  options?: { [key: string]: any },
) {
  return request<any>(`${apiPrefix}/station/fee/download/excel`, {
    method: 'GET',
    params: {
      // eleType has a default value: 1
      eleType: '1',
      ...params,
    },
    ...(options || {}),
  });
}

/** 编辑电价 编辑电价 POST /station/fee/edit */
export async function stationFeeControllerEditFee(
  body: API.StationFeeDto,
  options?: { [key: string]: any },
) {
  return request<boolean>(`${apiPrefix}/station/fee/edit`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 分页查询 分页查询数据 GET /station/fee/list */
export async function stationFeeControllerList(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.stationFeeControllerListParams,
  options?: { [key: string]: any },
) {
  return request<API.Pagination>(`${apiPrefix}/station/fee/list`, {
    method: 'GET',
    params: {
      // eleType has a default value: 1
      eleType: '1',
      ...params,
      page: undefined,
      ...params['page'],
    },
    ...(options || {}),
  });
}

/** 导入文件 导入文件数据 POST /station/fee/upload/excel */
export async function stationFeeControllerUploadExcel(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.stationFeeControllerUploadExcelParams,
  body: {},
  options?: { [key: string]: any },
) {
  return request<API.ApiResultVoid>(`${apiPrefix}/station/fee/upload/excel`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {
      ...params,
    },
    data: body,
    ...(options || {}),
  });
}
